<?php get_header(); ?>	
	<div id="content">
		<!-- Primary content: Stuff that goes in the primary content column (by default, the left column) -->
		<div id="primarycontainer">
			<div id="primarycontent">
				<div id="contentarea"><!-- Primary content area start -->
		<?php include_once(TEMPLATEPATH.'/intro.php');?>

				<?php 
					
					if($all_posts = ah_recent_posts_mu(10)) {
					foreach($all_posts as $all_post)
					{
					?>
						<div class="post" id="post-<?php echo $all_post->ID; ?>">
							<h4><a href="<?php echo $all_post->guid ?>" rel="bookmark" title="Permanent Link to <?php echo $all_post->post_title ?>"><?php  echo $all_post->post_title ?></a></h4>
							<div class="contentarea">
								<p class="details"><span class="user"><?php echo $all_post->post_author_name; ?></span> <span class="date"><?php echo $all_post->post_date_gmt ?></span></p>	
								<?php  echo $all_post->post_summary ; ?>...
								<a href="<?php echo $all_post->guid ?>" class="more-link"><?php _e('Continue Reading &raquo;') ?></a>
								<ul class="controls">
									<li class="comments"><a href="<?php echo $all_post->guid ?>#comments"><?php echo __('Comments') . " (" . $all_post->comment_count . ")"?></a></li>									
								</ul>
							</div>
						</div>													
					<?php
					}
				}
				else
				{
					echo '<p>Sorry, No Posts matched your criteria.</p>';
				}
				?>
			</div><!-- primarycontent end -->
		</div><!-- primarycontainer end -->
	</div><!--content end -->

<div id="sidebar">
<ul>
<li class="box">
	<h4>Fidirana</h4>

		
<?php 
	if (is_user_logged_in()) { 
	
	global $user_identity, $current_user;

	get_currentuserinfo();

	_e('Hello, ');

	echo $user_identity;

	_e('!');
?> 

<ul>
<li><a href="http://blaogy.org/wp-admin/"><?php _e('Manage') ?></a></li>
<li><a href="http://blaogy.org/wp-admin/profile.php"><?php _e('Profile') ?></a></li>
<li><a href="http://blaogy.org/wp-login.php?action=logout"><?php _e('Sign out') ?></a></li>
</ul>

<?php 
	} 
?>

<?php if ( !is_user_logged_in()) { ?>

<ul>
Efa mpikambana?

<?php 
//gestion d'erreur
	if ( $_REQUEST['login_error'] ) {
		
		$login_errors = unserialize(base64_decode($_REQUEST['login_error']));
		echo "<div style='color: #FF0000'>";
		foreach ($login_errors as $login_error)
		{
			echo $login_error;
		}
		echo "</div>";
	} 

?>
<form name="loginform" id="loginform" action="http://blaogy.org/wp-login.php" method="post">

<br /><label><?php _e('Username') ?>:<br /><input type="text" name="log" id="log" value="" size="20" tabindex="1" /></label>

<br /><label><?php _e('Password') ?>:<br /> <input type="password" name="pwd" id="pwd" value="" size="20" tabindex="2" /></label>

<br /><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" /><?php
	_e('Remember me');?></label>

<br /><input type="submit" name="submit" id="login" value="<?php _e('Login') ?> &raquo;" tabindex="4" />

</form>

<?php
} 
?>

</li>
<li class="box">
<h4>Niova farany</h4>
<?php

//$blogs = get_last_updated();
if( is_array( $blogs ) ) {
	?>
	<ul>
	<?php foreach( $blogs as $details ) {
		?><li><a href="http://<?php echo $details[ 'domain' ] . $details[ 'path' ] ?>"><?php echo get_blog_option( $details[ 'blog_id' ], 'blogname' ) ?></a></li><?php
	}
	?>
	</ul>
	<?php
}


?>
	<ul>
	<?php 
	list_all_wpmu_blogs('10', 'name', '<li>', '</li>', 'updated');
	?>
	</ul>

</li>




</ul>
</div>

<?php get_footer();?>




